package com.pan.service;

import com.pan.annotation.EntityNotNull;
import com.pan.annotation.RecordHistory;
import com.pan.annotation.UpdateStatusCheck;
import com.pan.dao.order1.OrderTable1SelectDao;
import com.pan.dao.order2.OrderTable2SelectDao;
import com.pan.entity.Result;
import com.pan.enume.EntityEnum;
import com.pan.enume.HistoryEnum;

public interface OrderUpdateService {
    @EntityNotNull(daoClass = OrderTable1SelectDao.class,idName = "order1Id")
    @UpdateStatusCheck(entity = EntityEnum.ORDER_1,idName = "order1Id")
    @RecordHistory(value = HistoryEnum.ORDER_1,idName = "order1Id")
    Result updateOrder1Status(String ticket, Long order1Id, Integer status);

    @EntityNotNull(daoClass = OrderTable2SelectDao.class,idName = "order2Id")
    @UpdateStatusCheck(entity = EntityEnum.ORDER_2,idName = "order2Id")
    @RecordHistory(value = HistoryEnum.ORDER_2,idName = "order2Id")
    Result updateOrder2Status(String ticket, Long order2Id, Integer status);
}
